using System;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.Text.Json.Serialization;

namespace UwinEducation.Application.Dtos
{
    /// <summary>
    /// 教室DTO
    /// </summary>
    public class ClassroomDto
    {
        /// <summary>
        /// 教室ID
        /// </summary>
        public Guid Id { get; set; }

        /// <summary>
        /// 教室名称
        /// </summary>
        public string Name { get; set; }

        /// <summary>
        /// 教室容量
        /// </summary>
        public int Capacity { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        //[JsonConverter(typeof(DateTimeConverter))]
        //[field: JsonConverter(typeof(DateTimeConverter))]
        public DateTime CreatedAt { get; set; }
    }
    /// <summary>
    /// 创建教室DTO
    /// </summary>
    public class CreateClassroomDto
    {
        /// <summary>
        /// 教室名称
        /// </summary>
        [Required(ErrorMessage = "教室名称不能为空")]
        public string Name { get; set; }

        [Required(ErrorMessage = "教室容量不能为空")]
        [Range(1, int.MaxValue, ErrorMessage = "教室容量必须大于0")]
        public int Capacity { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        public string? Remarks { get; set; }
    }
    /// <summary>
    /// 更新教室DTO
    /// </summary>
    public class UpdateClassroomDto: CreateClassroomDto
    {
        /// <summary>
        /// 教室ID
        /// </summary>
        [Required(ErrorMessage = "教室ID不能为空")]
        public Guid Id { get; set; }
    }
} 